<?php

namespace app\api\controller;

use app\api\model\wanlshop\TravelConnect;
use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $data = [
            'tripType' => 1,
            'adult' => 1,
            'cabinClass' => 0,
            'itinerary' => [
                [ 'fromCity' => 'HKG',
                    'toCity' => 'TPE',
                    'depDate' => '2021-09-22T00:00:00',
                    'fromCityType' => 1,
                    'toCityType' => 1,
                ]
            ],
            'lang' => 'zh-hk',
            'clientCurrency' => 'HKD'
        ];
        $travel = new TravelConnect();
        $travel->search($data);
        $this->success('请求成功');
    }
}
